<template>
  <div class="goList">
    <div class="imgDiv">
        <img :src="itDet.imgUrl" alt="">
    </div>
    <div class="box">
      <h4>{{itDet.title}}</h4>
      <p>{{itDet.desc}}</p>
      <button @click="toDet()">查看详情</button>
    </div>
  </div>
</template>

<script>
export default {
  props:["idDet","itDet"],
  methods:{
    toDet(){
      this.$router.push('/detail/'+this.idDet)
    }
  }
};
</script>

<style lang="scss" scoped>
.goList {
  height: 100px;
  display: flex;
  margin-bottom: 10px;
  .imgDiv {
    width: 100px;
    height: 100px;
    img{
      width: 100%;
      height: 100%;
    }
  }
  .box {
    padding: 10px 0 10px 10px;
    flex: 1;
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    p{
        font-size: 15px;
    }
    button{
        width: 70px;
        height: 30px;
        border: 0;
        border-radius: 5px;
        color: #ffffff;
        font-size: 15px;
        background-color: #ffb436;
    }
  }
}
</style>